package com.czxy.dao;

import com.czxy.domain.Customer;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public  interface  CustomerMapper extends Mapper<Customer> {


    @Select("select * from cst_customer")
    @Results({
            @Result(property = "custSourceBaseDict",
                    one = @One(select = "com.czxy.dao.BaseDictMapper.selectByPrimaryKey"),
                    column = "cust_source"),
            @Result(property = "custLevelBaseDict"
                    ,one = @One(select = "com.czxy.dao.BaseDictMapper.selectByPrimaryKey"),
                    column = "cust_level")


    })
    public List<Customer> findAll();


}
